package com.github.livebase.event;

import com.github.livebase.event.EventBus;

/**
 * @ClassName EventDispatcher
 * @description:
 * @author: biao532
 * @create: 2023-12-25 19:19
 * @Version 1.0
 **/
public interface EventDispatcher {
    interface DestroyListener {
        void onDestroy(EventDispatcher dispatcher);
    }
    boolean register(EventListener listener, boolean async);
    void dispatch(Event data);
    void unregister(EventListener listener);
    void destroy();
    String getEventId();
    void addDestroyListener(DestroyListener listener);
    void removeDestroyListener(DestroyListener listener);
}
